< previous page page_95 next page >

Page 95
add. After you select the image and click the Open button, it's added to the control and displayed in the images area.
12181-0095a.gif
Figure 4.1.
Adding the bitmaps to the ImageList control on
the Images page of the Property Pages dialog box.
Note
Visual Basic comes with many different types of graphics files that you can use in your applications. Any of the files can be found on Visual Basic's CD-ROM in the /COMMON/GRAPHICS directory.

Find the New and Open bitmaps in the PROGRAM FILES/MICROSOFT VISUAL STUDIO/COMMON/GRAPHICS/BITMAPS/TLBR_W95 directory and add them to the ImageList control. When you're finished, click OK to close the Property Pages dialog box.
Now you need to add the toolbar to your project. Follow these steps:
1. Place a Toolbar control on the form. It doesn't really matter where you put it; the default Align property places it at the top of the form.
2. Right-click the control and select Properties from the pop-up menu to display the control's Property Pages dialog box (see Figure 4.2).
3. On the General page, set the ImageList property to the ImageList control that you want to use. This property identifies which ImageList control (if you have more than one on the form) the Toolbar control will use to provide the bitmaps for the buttons. (Now you can see why you had to set up the ImageList control first.)
A little later, you'll look at two other interesting properties on the General page:
AllowCustomize specifies whether users can customize the toolbar by adding, deleting, or moving buttons.

 
< previous page page_95 next page >

If you like this book, buy it!